<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>垂直外边距合并</title>
    <style>
       .top,
       .bottom{
           width: 200px;
           height: 200px;
           background-color: brown;
       }
       .top{
           margin-bottom: 100px;
       }
       .bottom{
           background-color: blueviolet;
           margin-top:50px; 
       }
    </style>
</head>
<body>
    <div class="top"></div>
    <div class="bottom"></div>
</body>
</html>